package entity.DiscoverRecommend;

/**
 * Created by Administrator on 15-10-21.
 */

import android.util.Log;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * 小编推荐
 */
public class DiscoverRecommendAlbums extends DiscoverRecommendItem {
            /** "ret": 0,
            "title": "小编推荐",
            "hasMore": true,
            "list"
             */
            private int ret;
    private List<AlbumRecommend> list;
    public List<AlbumRecommend> getList() {
        return list;
    }
    public void setList(List<AlbumRecommend> list) {
        this.list = list;
    }
    public void parseJSON(JSONObject json) throws JSONException {
        super.parseJSON(json);
        ret=json.optInt("ret", 0);
        JSONArray array=json.getJSONArray("list");
        int len=array.length();
        list=new ArrayList<AlbumRecommend>();
        if(len>0)
        {
            for (int i = 0; i <len ; i++) {
                JSONObject obj=array.getJSONObject(i);
                AlbumRecommend album=new AlbumRecommend();
                album.parseJSON(obj);
                list.add(album);
            }
        }

    }
}
